/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Utiles;

import Utiles.Toaster;
import javax.swing.ImageIcon;
import javax.swing.JDesktopPane;

/**
 *
 * @author Luis_Angel
 */
public class AlertasTarea {
    private static JDesktopPane desktopPane;

    public AlertasTarea(JDesktopPane desktopPane){
        this.desktopPane = desktopPane;
    }

     public static void mostrarAlertas(String alerta){
        /* JXGlassBox jXGlassBox = new JXGlassBox();
        jXGlassBox.setLocation(desktopPane.getWidth()/2 ,desktopPane.getHeight()/2);
        jXGlassBox.setLayout(new BorderLayout());
        JLabel lbl_titulo = new JLabel("Atencion",JLabel.CENTER);
        JLabel lbl_cuerpo = new JLabel(alerta,JLabel.CENTER);
        JLabel lblVer = new JLabel("Ver");
        lblVer.setBorder(BorderFactory.createRaisedBevelBorder());
        lblVer.addMouseListener(new MouseAdapter(){
             public void mouseClicked(MouseEvent e){
                 System.out.println("ver alertas");
             }
        });
       // lbl.
        jXGlassBox.add(lbl_titulo,BorderLayout.NORTH);
        jXGlassBox.add(lbl_cuerpo,BorderLayout.CENTER);
        jXGlassBox.add(lblVer,BorderLayout.SOUTH);
        jXGlassBox.showOnGlassPane(desktopPane,desktopPane.getWidth(),desktopPane.getHeight()/2+100);*/

         Toaster toasterManager = new Toaster();
       //  toasterManager.showToaster( alerta);
         toasterManager.showToaster( new ImageIcon(desktopPane.getClass().getResource("/resources/alerta.png")),alerta );
    }

}
